#ifndef WELLSIZEDVECTOR2_H_
#define WELLSIZEDVECTOR2_H_

#include <vector>
#include <list>
#include <string>
#include <iostream>
#include "PositionVector.h"

class WellSizedVector2 {
public:
	WellSizedVector2() /*: vectorIndex(0)*/ {};
	
	void deleteAll() {
		for (uint i = 0; i < documents.size(); i++)
			delete documents[i];
		documents.clear();
	}
//	void initializeVector();
	void reserve(uint capacity) {
//		std::cout << "Reservando " << capacity << std::endl; 
		documents.reserve(capacity);
	}
//	void incSize() {vectorIndex++;}
//	void put(uint id, uint myPosition);
	void add(PositionVector *);
//	uint getSize() {return vectorIndex;}
	uint getVectorSize() const{ return documents.size(); }
	std::string listDocs();
	uint getSpecificId(uint position) const{ 
		if (position < documents.size() )
			return documents[position]->getId(); 
		else
			return -1;
	}
	uint getSpecificNumElements(uint position) const{ 
		if (position < documents.size() )
			return documents[position]->getNumElements(); 
		else
			return -1;
	}
	PositionVector * getSpecificPositionVector(uint position) const {
		if (position < documents.size() )
			return documents[position]; 
		else
			return NULL;
	}
//	void insert (std::vector<PositionVector> pVector) {documents.insert(documents.end(), pVector.begin(), pVector.end());}
//	std::vector<PositionVector> getDocuments() {return documents;}
	
private:
//	friend class MapsDisk;
	friend class Epiplon;
	std::vector<PositionVector *> documents;
//	uint vectorIndex;
};

#endif /*WELLSIZEDVECTOR2_H_*/
